package handle

import (
	"github.com/emicklei/go-restful/v3"
	"github.com/kataras/iris/v12"
)

type File struct {
}

func (r File) InitRoute(container *restful.Container) {
	ws := new(restful.WebService)

	ws.Route(ws.POST("/file/upload").To(r.Upload()))
	ws.Route(ws.POST("/file/uploads").To(r.FormFiles()))
	ws.Route(ws.POST("/file/uploadFormFiles").To(r.UploadFormFiles()))
	ws.Route(ws.POST("/file/sendFile").To(r.SendFile()))

	container.Add(ws)
}

const maxSize = 8 * iris.MB

func (r File) Upload() restful.RouteFunction {
	return func(request *restful.Request, response *restful.Response) {
	}
}
func (r File) FormFiles() restful.RouteFunction {
	return func(request *restful.Request, response *restful.Response) {
	}
}
func (r File) UploadFormFiles() restful.RouteFunction {
	return func(request *restful.Request, response *restful.Response) {

	}
}
func (r File) SendFile() restful.RouteFunction {
	return func(request *restful.Request, response *restful.Response) {
	}
}
